var TreeModelFactory=function(){
	
};

TreeModelFactory.prototype.createModel = function(componentModel) {
	var componentTreeModel = {
		"id": componentModel.id
	}
	var name="";
	var type=componentModel.type;
	if(type=="button"){
		name=componentModel["labelExpression"];
	}else if(type=="checkbox"){
		name=componentModel["labelExpression"];
	}else if(type=="checkboxlist"){
		name=componentModel["labelExpression"];
	}else if(type=="col"){
		name="列";
	}else if(type=="color"){
		name=componentModel["labelExpression"];
	}else if(type=="dashboardpage"){
		name=componentModel["refPageCode"];
	}else if(type=="date"){
		name=componentModel["labelExpression"];
	}else if(type=="datetime"){
		name=componentModel["labelExpression"];
	}else if(type=="detailreport"){
		name=componentModel["reportCode"];
	}else if(type=="div"){
		name="DIV";
	}else if(type=="formula"){
		name=componentModel["labelExpression"];
	}else if(type=="gauge"){
		name=componentModel["title"];
	}else if(type=="grouptitle"){
		name=componentModel["title"];
	}else if(type=="hbarchart"){
		name=componentModel["title"];
	}else if(type=="hidden"){
		name="隐藏域";
	}else if(type=="icon"){
		name="图标";
	}else if(type=="image"){
		name=componentModel["labelExpression"];
	}else if(type=="indicatortable"){
		name=componentModel["title"];
	}else if(type=="label"){
		name=componentModel["labelExpression"];
	}else if(type=="linechart"){
		name=componentModel["title"];
	}else if(type=="linkrecord"){
		name=componentModel["labelExpression"];
	}else if(type=="number"){
		name=componentModel["labelExpression"];
	}else if(type=="page"){
		name=componentModel["title"];
	}else if(type=="piechart"){
		name=componentModel["title"];
	}else if(type=="radiolist"){
		name=componentModel["labelExpression"];
	}else if(type=="rollupsummary"){
		name=componentModel["labelExpression"];
	}else if(type=="row"){
		name="行";
	}else if(type=="search"){
		name=componentModel["labelExpression"];
	}else if(type=="select"){
		name=componentModel["labelExpression"];
	}else if(type=="shortcutmenu"){
		name=componentModel["labelExpression"];
	}else if(type=="summaryreport"){
		name=componentModel["reportCode"];
	}else if(type=="switch"){
		name=componentModel["labelExpression"];
	}else if(type=="tablecolumn"){
		name=componentModel["title"];
	}else if(type=="table"){
		name="表格";
	}else if(type=="tabcontrol"){
		name="页签";
	}else if(type=="tag"){
		name=componentModel["labelExpression"];
	}else if(type=="textarea"){
		name=componentModel["labelExpression"];
	}else if(type=="text"){
		name=componentModel["labelExpression"];
	}else if(type=="time"){
		name=componentModel["labelExpression"];
	}else if(type=="tree"){
		name="树";
	}else if(type=="ureport2"){
		name="UReport2";
	}else if(type=="vbarchart"){
		name=componentModel["title"];
	}else if(type=="websocket"){
		name="websocket";
	}else if(type=="workflowsteps"){
		name="工作流步骤";
	}else if(type=="datagrid"){
		name="数据表格";
	}else if(type=="datagridcolumn"){
		name="数据表格列";
	}else if(type=="filtergroup"){
		name="过滤组";
	}else if(type=="mlistview"){
		name="列表";
	}else if(type=="mnavbar"){
		name=componentModel["title"];
	}
	componentTreeModel["name"]=name;
	return componentTreeModel;
}
export default new TreeModelFactory();